package spittr.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by ThinkPad on 2017/9/7.
 */
@Controller
@RequestMapping({"/","homePage"})//现在,home()方法能够映射到对"/"和"homePage"的GET请求
public class HomeController {

//    @RequestMapping(value = "/",method = RequestMethod.GET)
//    方法上的@RequestMapping注解会对类级别上的@RequestMapping进行补充
    @RequestMapping(method = RequestMethod.GET)
    public String home() {
        return "home";
    }
}
